using System;
using System.Collections.Generic;
using System.Text;
using JobShopModel.Model.FactoryLvl;
using JobShopModel.Model.Job;

namespace JobShopModel.Model.Transport
{
    class Transporter:JobShopModel.Events.IEvent
    {
        private Boolean moving;
        private Decimal speed;
        private Decimal totalTimeWaiting;
        private Decimal totalTimeTraveling;
        private StationsList destination;
        private Decimal distanceRemaining;
        private FIFOList list;
        public Transporter()
        {
            this.list = new FIFOList();
            this.moving = new Boolean(false);
            this.speed = new Decimal(0);
            this.totalTimeTraveling = new Decimal(0);
            this.totalTimeWaiting = new Decimal(0);
        }
        public Boolean isMoving
        {
            get
            {
                return this.moving;
            }
            set
            {
                this.moving = value;
            }
        }
        public Decimal Speed
        {
            get
            {
                return this.speed;
            }
            set
            {
                this.speed = value;
            }
        }
        public Decimal TotalTimeWaiting
        {
            get
            {
                return this.totalTimeWaiting;
            }
            set
            {
                this.totalTimeWaiting += value;
            }
        }
        public Decimal TotalTimeTraveling
        {
            get
            {
                return this.totalTimeTraveling;
            }
            set
            {
                this.totalTimeTraveling += value;
            }
        }
        public int Destination
        {
            get
            {
                return this.destination;
            }
            set
            {
                this.destination = value;
            }
        }
        public Decimal DistanceRemaining
        {
            get
            {
                return this.distanceRemaining;
            }
        }
        public new void fire()
            //occurs when transport reaches its destination
        {
            list.pop();
            if (!list.isempty())
            {
                //add next arrival time to event queue
            }
        }

    }
}
